-- GENERATED SPELL FOR [Scarlet Hunter] --


function spell0_1831(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(6660,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1831', 621, 1)
end

function spell1_1831(pUnit, Event) --@Summon Scarlet Hound,Self--
pUnit:FullCastSpellOnTarget(17164,pUnit)
pUnit:RegisterEvent('Sorts_1831', 533, 1)
end

function Sorts_1831(pUnit, Event)
local choix_sorts_1831 = math.random(0, 1)
if choix_sorts_1831 == 0 then
pUnit:RegisterEvent('spell0_1831', 1, 1)
end
if choix_sorts_1831 == 1 then
pUnit:RegisterEvent('spell1_1831', 1, 1)
end
end

function mob1831_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_1831', math.random(1500, 3000), 1)
end

function mob1831_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1831_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1831_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(1831, 1, 'mob1831_Action')
RegisterUnitEvent(1831, 2, 'mob1831_Leave')
RegisterUnitEvent(1831, 3, 'mob1831_Kill')
RegisterUnitEvent(1831, 4, 'mob1831_Die')
